/**
 * @copyright SilverBiology, LLC
 * @website http://www.silverbiology.com
*/

Ext.namespace('Gbif.Glossary')

Gbif.Glossary.Panel = function(config){
	
	Ext.apply(this,config,{
			style: 'padding: 10px'
		,	closable: true
		,	autoScroll: true
		,	autoDestroy: true
	});

	Gbif.Glossary.Panel.superclass.constructor.call(this,config)

}

Ext.extend( Gbif.Glossary.Panel , Ext.Panel, {

	scrollToMember:function(id){
		
		var el = Ext.getDom(id);
		if (el) {
			var top = (Ext.fly(el).getOffsetsTo(this.body)[1]) + this.body.dom.scrollTop;
			this.body.scrollTo('top', top - 25, {
					duration: 0.5
				,	callback: function(){
					}
			});
			
		}
	}

});